package com.leo.javase.thread.blog;

public class TestInterrupted {

	public static void main(String[] args) throws InterruptedException {
		MyThread1 mt = new MyThread1();
		mt.start();
		Thread.sleep(2000);
		mt.interrupt();
	}

}
class MyThread1 extends Thread{
	@Override
	public void run() {
		while(true){
			try {
				wait();
			} catch (InterruptedException e) {
				return ;
			}
		}
	}
}